﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TagListCtrl.ascx.cs" Inherits="ShopOnline.Controls.TagListCtrl" %>

<style>
    .tag-item
    {
        margin:5px; display:block;
        border: 1px solid #bcbcbc;
        width:150px;
        padding-left:5px;
        text-align:left;
        vertical-align:middle;
        height:20px;
        -moz-border-radius: 5px;
        -webkit-border-radius: 5px;
        -khtml-border-radius: 5px;
        border-radius: 5px;
        padding:5px;
    }
    
    .delete
    {
        float:right; margin-right: 5px
    }
</style>

<script type="text/javascript">
    function onMouseOver(div) {
        $(div).find('.delete').show();
    }

    function onMouseOut(div) {
        $(div).find('.delete').hide();
    }
</script>

<asp:DataList ID="datalist" runat="server" >
    <ItemTemplate>
        <div class='tag-item' onmouseover="onMouseOver(this);" onmouseout=" onMouseOut(this);" >
            <a title='<%# Eval("Tag") %>' runat="server" href='<%# "Search.aspx?tag=" + Eval("Tag") %>'> <%# Eval("Tag") %> </a>
            <b style='color:#fa3e9d; font-size:10px'>X</b> 
            <b style='color:#fa3e9d; font-size:14px'><%# Eval("Count") %></b> 
            <asp:LinkButton style='display:none' class='delete' Visible='<%# POSSystem.BLL.View_Users.GetCurrentUser() != null %>' OnClientClick="return confirm('Are you sure to delete this tag?');" ID="btnDelete" ToolTip="Delete Tag" Tag='<%# Eval("Tag") %>' runat="server" OnClick="btnDelete_OnClick">
                    <img src="../../images/delete_icon.gif" />
            </asp:LinkButton>
        </div>
    </ItemTemplate>
</asp:DataList>